<?php

class OrderService extends BaseService
{
    private static $self = NULL;

    static public function instance()
    {
        if (self::$self == NULL) {
            self::$self = new self;
        }

        return self::$self;
    }

    /********************** Model **********************/

    private $mOrder = NULL;
    private $mAds = NULL;


    /********************** Table Object **********************/

    public function __construct()
    {
        $this->mOrder = new Involved_OrderModel();
        $this->mAds = new Involved_AdsModel();
    }


    /**
     * 表单参数
     * @param $obj
     * @param $arr
     * @author  alice
     * @date    2016-1-14
     * @return bool
     */
    public function  checkProperties($obj, $arr)
    {
        if (empty($arr)) return true;
        $obj = (array)$obj;

        foreach ($arr as $v) {
            if (empty($obj[$v])) {
                return false;
            }
        }
        return true;
    }


}